// 获取车辆类型分页数据
import request from '@/utils/request'

// 获取车辆分页数据
export function getCarInfo (params) {
  return request({
    url: '/manager/truck/page',
    method: 'GET',
    params
  })
}
// 统计车辆状态数量
export function getCarStatus () {
  return request({
    url: '/manager/count',
    method: 'GET'
  })
}
// 添加车辆
export function addVehicle (data) {
  return request({
    url: '/manager/truck',
    method: 'POST',
    data
  })
}
// 停用车辆
export function deactivateTheVehicle (id) {
  return request({
    url: `/manager/disable/${id}`,
    method: 'PUT'
  })
}
// 启用车辆
export function enableVehicle (id) {
  return request({
    url: `/manager/enable/${id}`,
    method: 'PUT'
  })
}
